<?php if( !defined( 'MAIN_DIR' ) ) { header( 'Location: ' . dirname( PHP_SELF ) . '/' ); exit( ); }
	$LANG = ( isset( $LANG ) && $LANG ? $LANG : null );
?><div id="contentHolder">
<script language="javascript" type="text/javascript">
//<![CDATA[
function validateLogin( )	{
	if ( document.getElementById( 'user_name' ).value.length == 0 )	{
		document.getElementById( 'user_name' ).focus( );
		alert( <?php echo toJS ( $LANG['E']['USER_LOGIN'] ) ?> );
	}
	else if ( document.getElementById( 'user_password' ).value.length == 0 )	{
		document.getElementById( 'user_password' ).focus( );
		alert( <?php echo toJS ( $LANG['E']['USER_PASSWORD'] ) ?> );
	}
	else
		return true;
	return false;
}
//]]>
</script>
	<table summary="Content" width="100%" style="height:100%" border="0" cellspacing="0" cellpadding="0">
	<tr>
		<td align="center" valign="middle">
			<div class="r_table">
				<div class="r_top"></div>
				<div class="r_inner">
					<div class="r_grad"></div>
					<div style="padding:5px;">
						<form name="login_form" id="login_form" method="post" action="index.php" onsubmit="return validateLogin( );return false;">
						<table summary="Login" border="0" cellspacing="0" cellpadding="5" class="text">
						<tr>
							<td align="left" colspan="2" style="border-bottom: 1px solid #F4F3E8">
								<img src="images/protect.png" width="16" height="16" alt="Home" border="0" />&nbsp;&nbsp;<b><?= SITE_NAME ?></b>
							</td>
						</tr>
						<tr>
							<td><?php echo $LANG['L']['USER'] ?>:</td>
							<td><input class="inputText" type="text" name="user_name" id="user_name" tabindex="1" value="<?php echo ( isset( $_POST['user_name'] ) ? $_POST['user_name'] : '' ) ?>" style="background-image: url(images/bullet_user.png); background-position: 2px center; background-repeat: no-repeat; padding-left: 14px;" /></td>
						</tr>
						<tr>
							<td><?php echo $LANG['L']['PASSWORD'] ?>:</td>
							<td><input class="inputText" type="password" name="user_password" id="user_password" tabindex="2" style="background-image: url(images/bullet_key.png); background-position: 2px center; background-repeat: no-repeat; padding-left: 14px;" /></td>
						</tr>
						<tr>
							<td align="right" colspan="2" style="border-bottom: 1px solid #F4F3E8"><div style="width:100px;" class="button"><a href="#" onclick="if( validateLogin( ) ) document.getElementById( 'login_form' ).submit( ); return false;" tabindex="3"><?php echo $LANG['L']['LOGIN'] ?>&nbsp;&raquo;&nbsp;&nbsp;<input type="image" src="images/target.png" style="width: 16px; height: 16px;" value="bullseye" /></a></div></td>
						</tr>
<?
	if( defined( 'LOGIN_ERROR' ) )	{
?>
						<tr>
							<td colspan="2" align="right">
								<div class="r_gd_table" style="width: 170px;">
									<div class="r_gd_top"></div>
									<div class="r_gd_inner">
										<div class="r_gd_grad"></div>
										<div style="padding:5px;">
											<table summary="Login Error" border="0" cellspacing="0" cellpadding="2" class="textError" align="center">
											<tr>
												<td><img src="images/cross.png" width="16" height="16" alt="Home" border="0" /></td>
												<td><?php echo $LANG['E']['LOGIN'] ?></td>
											</tr>
											</table>
										</div>
										<div class="r_gd_grad"></div>
									</div>
									<div class="r_gd_bottom"></div>
								</div>
							</td>
						</tr>
<?
	}
?>
						<tr>
							<td colspan="2" align="right">
								<b>S.W.A.T. <?php echo SWAT_TYPE ?></b>
							</td>
						</tr>
						</table>
						</form>
						<script language="javascript" type="text/javascript">
							//<![CDATA[
							toObject( 'user_<?php echo ( defined( 'LOGIN_ERROR' ) ? 'password' : 'name' ) ?>' ).focus( );
							//]]>
						</script>						
					</div>
					<div class="r_grad"></div>
				</div>
				<div class="r_bottom"></div>
			</div>
		</td>
	</tr>
	</table>
</div>

			
